home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
MPEG Toolkit
/
MPEG Toolkit.iso
/
win
/
med-lib
/
mdctrl.z
/
MEDIADYN.INC
< prev
next >
Wrap
Text File
|
1996-03-05
|
23KB
|
365 lines
{* ********************************************************************** *}
{* *** MEDIADYN.INC *** *}
{* *** *** *}
{* *** Media Control Library *** *}
{* *** A Product of MediaDynamics Inc. (c) 1993-1996 *** *}
{* *** ___ ___ *** *}
{* *** | \ / | *** *}
{* *** | \ / | *** *}
{* *** | \ / | *** *}
{* *** | \ __ /___ | *** *}
{* *** | |\ \ | | |\ *** *}
{* *** | | \ \| -----| | \ *** *}
{* *** | | \ \/ / | | \ *** *}
{* *** | | \ / | |\ \ *** *}
{* *** | | \ / | | | | *** *}
{* *** | | \ /| | | | | *** *}
{* *** |__| \/ | |__| | | *** *}
{* *** | | | | *** *}
{* *** | | / / *** *}
{* *** | |-------/ / *** *}
{* *** |____________/ *** *}
{* *** *** *}
{* *** *** *}
{* *** Declaration file for using the Media Control Library within *** *}
{* *** Borland Delphi *** *}
{* *** *** *}
{* ********************************************************************** *}
{ ******************************************************************** }
{ *** *** }
{ *** Constants *** }
{ *** *** }
{ ******************************************************************** }
Const
{ ******************************************************************** }
{ *** For use with the Command: mdPlay *** }
{ ******************************************************************** }
MD_PLAY_NONMODAL: Integer = 0; { Normal mode - Play concurrently }
MD_PLAY_MODAL: Integer = 1; { Modal - Play til done }
{ ******************************************************************** }
{ *** For use with the Commands: mdSetCursor, *** }
{ *** mdSetVideoCursor, *** }
{ *** mdSetCtrlCursor *** }
{ ******************************************************************** }
MD_CURSOR_BLANK: Integer = 0; { Invisible cursor }
MD_CURSOR_HAND1: Integer = 1; { Type 1 hand cursor }
MD_CURSOR_HAND2: Integer = 2; { Type 2 hand cursor }
MD_CURSOR_HOURGLASS: Integer = 3; { Wait hourglass }
MD_CURSOR_MAGNIFY: Integer = 4; { Magnifying glass }
MD_CURSOR_QUESTPOINT: Integer = 5; { Pointer cursor with question mark }
MD_CURSOR_CROSSHAIR1: Integer = 6; { Type 1 crosshair cursor }
MD_CURSOR_CROSSHAIR2: Integer = 7; { Type 2 crosshair cursor }
MD_CURSOR_CROSS: Integer = 8; { Large cross cursor }
MD_CURSOR_MOVE: Integer = 9; { left/right/up/down arrow cursor }
{ ******************************************************************** }
{ *** For use with the Command: mdSetAudioLevel *** }
{ ******************************************************************** }
MD_AUDIO_MIN: Integer = 0; { Lowest audio level }
MD_AUDIO_MAX: Integer = 100; { Maximum audio level }
{ ******************************************************************** }
{ *** For use with the Command: mdSetPlaybackSpeed *** }
{ ******************************************************************** }
MD_PLAYBACK_MIN: Integer = 0; { Slowest playback speed }
MD_PLAYBACK_NORM: Integer = 100; { Normal playback speed }
MD_PLAYBACK_MAX: Integer = 200; { Double playback speed }
{ ******************************************************************** }
{ *** For use with the Command: mdGetPlayState *** }
{ ******************************************************************** }
MD_PLAYSTATE_CLOSED: Integer = 0; { No file is open }
MD_PLAYSTATE_PLAYING: Integer = 1; { File is currently playing }
MD_PLAYSTATE_SEEKING: Integer = 2; { File is currently seeking to a frame }
MD_PLAYSTATE_PAUSED: Integer = 3; { File is currently paused }
MD_PLAYSTATE_END: Integer = 4; { File has played to the end (Of the file or specified clip) }
MD_PLAYSTATE_STOPPED: Integer = 5; { File is currently stopped }
{ ******************************************************************** }
{ *** For use with the Command: mdGetFileType *** }
{ ******************************************************************** }
MD_MEDIATYPE_AVI: Integer = 0; { VfW, Indeo, Cinepak, etc. }
MD_MEDIATYPE_AVS: Integer = 1; { Intel DVI (RTV or PLV) }
MD_MEDIATYPE_WAV: Integer = 2; { Wave Audio (Compressed or Uncompressed }
MD_MEDIATYPE_MPEG: Integer = 3; { MPEG Video }
MD_MEDIATYPE_QTW: Integer = 4; { Quicktime for Windows }
{ ******************************************************************** }
{ *** For use with the Commands: mdOpen and mdSetWinSize *** }
{ ******************************************************************** }
MD_VIDSIZE_W_AUTOMATIC: Integer = 10; { Width Parameter: Automatically size the video }
MD_VIDSIZE_H_AUTOMATIC: Integer = 0; { Height Parameter: Required to make the sizing automatic }
{ ******************************************************************** }
{ *** For use with the Commands: mdOpen and mdSetClip *** }
{ ******************************************************************** }
MD_FRAME_DEFAULT_BEG: LongInt = 0; { Automatically start the clip at the 1st frame }
MD_FRAME_DEFAULT_END: LongInt = 0; { Automatically end the clip on the last frame }
{ ******************************************************************** }
{ *** For use with the Command: mdOpen *** }
{ ******************************************************************** }
MD_LOAD_AV_SHOW: Integer = 0; { Preload Parameter: Load and immediately show }
MD_LOAD_AV_HIDDEN: Integer = 1; { Preload Parameter: Load and keep hidden until mdShow }
{ ******************************************************************** }
{ *** For use with the Commands: mdOpen and mdSetCtrlType *** }
{ ******************************************************************** }
MD_CONTROL_INT_MODAL: Integer = 1; { Shows the control bar with a close button (modal) }
MD_CONTROL_INT_NONMODAL: Integer = 2; { Shows the control bar without a close button (non-modal) }
MD_CONTROL_INT_NONE: Integer = 3; { Does not show the control bar (best with user defined controls) }
{ ******************************************************************** }
{ *** *** }
{ *** Control Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Function mdOpen ( hwndParent: Word; szFileName: PChar;
nXPos, nYPos, nWidth, nHeight: Integer;
lBegFrame, lEndFrame: LongInt;
nCtrlType, bPreload: Integer): Integer;
far; external 'mdCtrl';
Function mdOpenLite ( hwndParent: Word; szFileName: PChar;
nXPos, nYPos: Integer;
nCtrlType: Integer): Integer; far; external 'mdCtrl';
Function mdClose ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Procedure mdPlay ( nFileHandle, nFlag: Integer ); far; external 'mdCtrl';
Procedure mdPause ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdStep ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdStop ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdGotoFrame ( nFileHandle: Integer; dwGotoFrame: LongInt ); far; external 'mdCtrl';
Procedure mdRewind ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdRestart ( nFileHandle: Integer ); far; external 'mdCtrl';
Function mdOpenDevice ( szDevice PChar ): Integer; far; external 'mdCtrl';
Function mdCloseDevice ( szDevice PChar ): Integer; far; external 'mdCtrl';
{ ********************************************************************** }
{ *** Prototypes: Custom Control Functions (4) *** }
{ ********************************************************************** }
Function mdCloseInterface ( nInterfaceNo: Integer ): Integer;
far; external 'mdCtrl';
Function mdOpenInterface ( szBMFileName, szBMPosInfoFileName: PChar ): Integer;
far; external 'mdCtrl';
Function mdGetButtonClicked ( int nFileHandle ):Integer; far; external 'mdCtrl';
Function mdSetInterfaceNo ( int nInterfaceNo ): Integer; far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Window Control Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Procedure mdHide ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdShow ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdHideVideo ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdShowVideo ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdHideCtrl ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdShowCtrl ( nFileHandle: Integer ); far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Parameter Setting Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Procedure mdSetClip ( nFileHandle: Integer; dwBeg, dwEnd: LongInt ); far; external 'mdCtrl';
Procedure mdSetWinPos ( nFileHandle, nXPos, nYPos: Integer ); far; external 'mdCtrl';
Procedure mdSetWinSize ( nFileHandle, nWidth, nHeight: Integer ); far; external 'mdCtrl';
Procedure mdSetVideoWinPos ( nFileHandle, nXPos, nYPos: Integer ); far; external 'mdCtrl';
Procedure mdSetVideoWinSize ( nFileHandle, nWidth, nHeight: Integer ); far; external 'mdCtrl';
Procedure mdSetCtrlWinPos ( nFileHandle, nXPos, nYPos: Integer ); far; external 'mdCtrl';
Procedure mdSetCtrlWinSize ( nFileHandle, nWidth: Integer ); far; external 'mdCtrl';
Procedure mdSetWindowMoveable ( nFileHandle, bMoveable: Integer ); far; external 'mdCtrl';
Procedure mdSetWindowInteractive( nFileHandle, bInteract: Integer ); far; external 'mdCtrl';
Procedure mdSetAudioLevel ( nFileHandle, nAudioLevel: Integer ); far; external 'mdCtrl';
Procedure mdSetAudioMute ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdSetCtrlType ( nFileHandle, nType: Integer ); far; external 'mdCtrl';
Procedure mdSetWinTop ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdSetWinBottom ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdSetNewParent ( nFileHandle, hNewParent: Integer ); far; external 'mdCtrl';
Procedure mdSetClippingRegion ( nFileHandle, nXPos, nYPos, nWidth, nHeight, nDisplayFlag: Integer );
far; external 'mdCtrl';
Procedure mdSetVideoAspect ( nFileHandle, nXPos, nYPos, nWidth, nHeight,
nJustify, bLimitFlag: Integer ); far; external 'mdCtrl';
Procedure mdSetVideoOffset ( nFileHandle, nDown, nRight: Integer ); far; external 'mdCtrl';
Procedure mdSetVideoPalette ( bPalFlag: Integer ); far; external 'mdCtrl';
Procedure mdSetKeyColor ( nRed, nGreen, nBlue: Integer ); far; external 'mdCtrl';
Procedure mdSetPlaybackSpeed ( nFileHandle, nPlaybackSpeed: Integer ); far; external 'mdCtrl';
Function mdSetActivePalette ( szActivePaletteFile: PChar ): Integer; far; external 'mdCtrl';
Function mdSetPlayRepeat ( nFileHandle, bRepeatFlag: Integer ): Integer; far; external 'mdCtrl';
Function mdSetParamDirect ( nFileHandle, nIndex: Integer; lValue: LongInt ):
Integer; far; external 'mdCtrl';
Function mdSetTimeFormat ( nFileHandle, wTimeFormat: Integer ): Integer; far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Informational Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Function mdGetFileType ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetWindowHandle ( nFileHandle: Integer ): Word; far; external 'mdCtrl';
Function mdGetCtrlWindowHandle ( nFileHandle: Integer ): Word; far; external 'mdCtrl';
Function mdGetDeviceID ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetFrame ( nFileHandle: Integer ): LongInt; far; external 'mdCtrl';
Function mdGetClipFrame ( nFileHandle: Integer ): LongInt; far; external 'mdCtrl';
Function mdGetLength ( nFileHandle: Integer ): LongInt; far; external 'mdCtrl';
Function mdGetClipLength ( nFileHandle: Integer ): LongInt; far; external 'mdCtrl';
Function mdGetPlayState ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetDisplayState ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Procedure mdGetWinPos ( nFileHandle: Integer; nXPos, nYPos: PInteger ); far; external 'mdCtrl';
Procedure mdGetWinSize ( nFileHandle: Integer; nWidth, nHeight: PInteger ); far; external 'mdCtrl';
Function mdGetWinX ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetWinY ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetWinWidth ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetWinHeight ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Procedure mdGetVideoWinPos ( nFileHandle: Integer; nXPos, nYPos: PInteger ); far; external 'mdCtrl';
Procedure mdGetVideoWinSize ( nFileHandle: Integer; nWidth, nHeight: PInteger ); far; external 'mdCtrl';
Function mdGetVideoWinX ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVideoWinY ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVideoWinWidth ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVideoWinHeight ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Procedure mdGetCtrlWinPos ( nFileHandle: Integer; nXPos, nYPos: PInteger ); far; external 'mdCtrl';
Procedure mdGetCtrlWinSize ( nFileHandle: Integer; nWidth: PInteger ); far; external 'mdCtrl';
Function mdGetCtrlWinX ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetCtrlWinY ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetCtrlWinWidth ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetAreaClicked ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetOpenFileCount: Integer; far; external 'mdCtrl';
Function mdGetFrameRate ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetPlayedStatus ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVolumeLevel ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVideoImage ( nFileHandle: Integer; szFileName: PChar ): Integer; far; external 'mdCtrl';
Procedure mdGetOrigVideoWinSize ( nFileHandle: Integer; Width, Height: PInteger ); far; external 'mdCtrl';
Function mdGetFileName ( nFileHandle: Integer; szFileName: PChar; nMaxLen: Integer ): Integer; far; external 'mdCtrl';
Function mdGetFramesSkipped ( nFileHandle: Integer ): LongInt; far; external 'mdCtrl';
Procedure mdGetPosClicked ( nFileHandle: Integer; lpnXPos, lpnYPos: PInteger ); far; external 'mdCtrl';
Function mdGetXPosClicked ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetYPosClicked ( nFileHandle: Integer ): Integer; far; external 'mdCtrl';
Function mdGetVersion: LongInt; far; external 'mdCtrl';
Function mdGetVideoPalette: Integer; far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Graphics Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Function mdOpenGraphic ( nFileHandle: Integer; szFileName: PChar ): Integer; far; external 'mdCtrl';
Function mdOpenGraphicKeep ( nFileHandle: Integer; szFileName: PChar ): Integer; far; external 'mdCtrl';
Function mdShowGraphic ( nFileHandle, bShowPalette: Integer ): Integer; far; external 'mdCtrl';
Function mdShowGraphicPos ( nFileHandle, nXPos, nYPos, nWidth, nHeight, bShowPalette: Integer ):
Integer; far; external 'mdCtrl';
Procedure mdHideGraphic ( nFileHandle: Integer ); far; external 'mdCtrl';
Procedure mdCloseGraphic ( nFileHandle: Integer ); far; external 'mdCtrl';
Function mdDisplayGraphic ( nFileHandle: Integer; szFileName: PChar;
nXPos, nYPos, bShowPalette: Integer ): Integer; far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Cursor Control Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Procedure mdSetCursor ( nCursorNo: Integer ); far; external 'mdCtrl';
Procedure mdResetCursor; far; external 'mdCtrl';
Procedure mdSetVideoCursor ( nCursorNo: Integer ); far; external 'mdCtrl';
Procedure mdResetVideoCursor; far; external 'mdCtrl';
Procedure mdSetCtrlCursor ( nCursorNo: Integer ); far; external 'mdCtrl';
Procedure mdResetCtrlCursor; far; external 'mdCtrl';
{ ******************************************************************** }
{ *** *** }
{ *** Miscellaneous Functions and Subroutines *** }
{ *** *** }
{ ******************************************************************** }
Procedure mdTimedDelay ( fSeconds: Single ); far; external 'mdCtrl';
Function mdFileDoesNotExist ( szFileName: PChar ): Integer; far; external 'mdCtrl';
Function mdFileDoesExist ( szFileName: PChar ): Integer; far; external 'mdCtrl';
Procedure mdDisplayErrorMsgs ( bErrMsgFlag: Integer ); far; external 'mdCtrl';
Function mdCDEject: Integer; far; external 'mdCtrl';
Procedure mdAbout; far; external 'mdCtrl';
Function mdMCISendString ( nFileHandle: Integer; szMCIString: PChar ): LongInt; far; external 'mdCtrl';
Function mdCloseLibrary: Integer; far; external 'mdCtrl';
Function mdOpenLibrary: Integer; far; external 'mdCtrl';
{ ********************************************************************** }
{ *** Prototypes: Audio Record Procedures (5) *** }
{ ********************************************************************** }
Function mdWaveRecordInit: LongInt; far; external 'mdCtrl';
Function mdWaveClose: LongInt; far; external 'mdCtrl';
Function mdWaveRecord ( dwMilliSeconds: LongInt; bModal: Integer ): LongInt; far; external 'mdCtrl';
Function mdWaveRecordSave ( szFileName: PChar ): LongInt; far; external 'mdCtrl';
Function mdWaveRecordPlayback: LongInt; far; external 'mdCtrl';
{ ********************************************************************** }
{ *** Prototypes: Error Handling (3) *** }
{ ********************************************************************** }
Function mdGetErrorNumber ( nFileHandle, nInfoNo: Integer ): Integer; far; external 'mdCtrl';
Procedure mdGetErrorText ( nErrorNo: Integer; szStringOut: PChar, nStringLen: Integer ); far; external 'mdCtrl';
Function mdLogErrors ( szErrorLogFileName: PChar, bLogErrors: Integer ): Integer; far; external 'mdCtrl';